package com.leyou.item.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leyou.item.dto.*;
import com.leyou.item.entity.Spu;

import java.util.List;
import java.util.Map;

/**
 * @author YYP
 * @date 2020/12/30
 */
public interface GoodsService {



    PageDTO<SpuDTO> findSpuByPage(Long page, Long rows, Long brandId, Long categoryId, Long id, Boolean saleable);

    void addGoods(SpuDTO spuDTO);

    void updateGoods(SpuDTO spuDTO);

    void updateSaleable(Long id,Boolean saleable);

    List<SkuDTO> listSkuByIds(List<Long> skuIds);

    List<SkuDTO> listSkuBySpuId(Long spuId);

    SpuDetailDTO querySpuDetailBySpuId(Long spuId);

    List<SpecParamDTO> listSpuParamsByQuery(Long spuId, Boolean searching);

    SpuDTO querySpuSkuDetailBySpuId(Long spuId);

    SpuDTO querySpuBySpuId(Long spuId);

    void listJianStock(Map<String,Long> params);

    void minusStock(Map<Long, Integer> cartsMap);
}
